package com.huabo.audit.oracle.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.springframework.format.annotation.DateTimeFormat;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Table(name = "TBL_STAFF")
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class TblStaff {
    public final static Integer USER_DISABLE=0;//禁用
    public final static Integer USER_ENBLE=1;//启用

    public final static String REGISTERUSERPASSWORD = "12345678";

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "select HIBERNATE_SEQUENCE.nextval from dual")
    @TableId("STAFFID")
    private BigDecimal staffid;//主键ID,自动增长
    @TableField("REALNAME")
    private String realname;//真实名字
    @TableField("FIXEDPHONE")
    private String fixedphone;//固定电话
    @TableField("ADDRESS")
    private String address;//地址
    @TableField("EMAIL")
    private String email;//邮箱
    @TableField("MIBLEPHONE")
    private String miblephone;//手机号码
    @TableField("MEMO")
    private String memo;//备注
    @TableField("USERNAME")
    private String username;//用户名（登录名）
    @TableField("PASSWORD")
    private String password;//密码
    @TableField("JOBID")
    private BigDecimal jobid;//岗位ID
    @TableField("CREATETIME")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date createtime;
    @TableField("STATUS")
    private Integer status;//状态（1启用，0弃用）
    @TableField("ORGID")
    private BigDecimal orgid;//组织Id
    @TableField("OUTSIDEID")
    private Integer outSideId; //标识用户来源 为null是本系统，1：蜂信，2,蜂信购买后的用户   3：华博云系统注册用户管理员  以后可能为2,3...来表示其它来源
    @TableField("OUTSIDEOPENID")
    private String outSideOpenId; //外部同步企业来源Id
    @Transient
    private String orgName;
    @Transient
    private String jobName;
    @Transient
    private String orgFatherName;
    @Transient
    private String rn;
    @Transient
    private String checked;
    
    
    @TableField("BIRTHDAY")
	@Column(name = "BIRTHDAY")
	@ApiModelProperty(value = "出生年月")
	private Date birthday;
	
	@TableField("POLITICALOUTLOOK")
	@Column(name = "POLITICALOUTLOOK")
	@ApiModelProperty(value = "政治面貌")
	private String politicaloutlook;

	@TableField("EDUCATION")
	@Column(name = "EDUCATION")
	@ApiModelProperty(value = "学历")
	private String education;
	
	@TableField("MAJOR")
	@Column(name = "MAJOR")
	@ApiModelProperty(value = "专业")
	private String major;
 
	@TableField("SCHOOL")
	@Column(name = "SCHOOL")
	@ApiModelProperty(value = "毕业院校")
	private String school;
	 
	@TableField("OFFICEPHONE")
	@Column(name = "OFFICEPHONE")
	@ApiModelProperty(value = "办公电话")
	private String officephone;
	 
	@TableField("WORKTIME")
	@Column(name = "WORKTIME")
	@ApiModelProperty(value = "参加工作时间")
	private Date worktime;
	 
	@TableField("TITLE")
	@Column(name = "TITLE")
	@ApiModelProperty(value = "职称")
	private String title;
 
	@TableField("QUALIFICATION")
	@Column(name = "QUALIFICATION")
	@ApiModelProperty(value = "执业资格")
	private String qualification;
	
	@TableField("SITUATION")
	@Column(name = "SITUATION")
	@ApiModelProperty(value = "参加审计/检查情况")
	private String situation;
	
	@TableField("ENTRYTIME")
	@Column(name = "ENTRYTIME")
	@ApiModelProperty(value = "入职时间")
	private Date entrytime;
	
	@TableField("RESIGNATIONTIME")
	@Column(name = "RESIGNATIONTIME")
	@ApiModelProperty(value = "离职时间")
	private Date resignationtime;
	
	@TableField("JOBEXPERIENCES")
	@Column(name = "JOBEXPERIENCES")
	@ApiModelProperty(value = "主要工作经历 ")
	private String jobexperiences;
	
	@TableField("AUDITORTYPE")
	@Column(name = "AUDITORTYPE")
	@ApiModelProperty(value = "审计人员类型 ")
	private String auditortype;
 
	 
	@TableField("TYPE")
	@Column(name = "TYPE")
	@ApiModelProperty(value = "全职/兼职 ")
	private String type;
	
	@TableField("ISAUDIT")
	@Column(name = "ISAUDIT")
	@ApiModelProperty(value = "是否是审计人员 ")
	private String isAudit;
	
	
	@TableField("GENDER")
	@Column(name = "GENDER")
	@ApiModelProperty(value = "性别 ")
	private String gender;
	 
	@TableField("DATASOURCE")
	private String dataSource;
	
	@TableField("HISTORYCODE")
	private String historycode;
	
	@TableField("HISTORYDEPARTMENTID")
	private String historydepartmentid;
	

    @Transient
    private TblOrganization linkDetp;//用户隶属的部门
    @Transient
    private TblOrganization currentOrg;//用户当前所在的公司
    @Transient
    private TblOrganization linkOrg;//用户隶属的公司


}
